/**
 * 
 */
package com.gragra.parseOptions;
import it.unimi.dsi.fastutil.objects.ObjectArrayList;
/**
 * @author Christoph Teichmann
 * 13.05.2013
 */
public class ListOfDoubleOption extends DescribeAtCreationOption
{
	/**
	 * 
	 */
	private double[] vals = null;
	/**
	 * 
	 * @param description
	 */
	public ListOfDoubleOption(String description)
	{super(description);}
	/* (non-Javadoc)
	 * @see com.gragra.parseOptions.OptionInformation#processArguments(it.unimi.dsi.fastutil.objects.ObjectArrayList)
	 */
	@Override
	public void processArguments(ObjectArrayList<String> arguments)
			throws CommandLineException
	{
		this.vals = new double[arguments.size()];
		for(int i=0;i<arguments.size();++i)
		{this.vals[i] = Double.parseDouble(arguments.get(i));}
	}
	/* (non-Javadoc)
	 * @see com.gragra.parseOptions.OptionInformation#hasBeenSet()
	 */
	@Override
	public boolean hasBeenSet()
	{return vals != null;}
	/**
	 * 
	 * @return
	 */
	public double[] getSettings()
	{return this.vals;}
}